<?php 

/**
 * Joomla! 1.5 component arts_curriculum
 * @package    com_arts_curriculum
 * @subpackage
 * @author     Chris Borkowski {@link http://www.guggenheim.org}
 * @author     Created on 15-December-2009
 */

// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );


?>
<div id="ac_lesson_page">

<div id="ac_lesson_cat_title">
<a href="<?php echo JRoute::_( 'index.php?view=category&id='.$this->item->cat_id); ?>"class="ac_category_cat_link">
<h2><?php echo $this->item->category; ?></h2>

</a>
</div>

<div id="ac_lesson_title"><h4><?php echo $this->escape($this->item->title); ?></h4>
</div>

<?php $uri =& JFactory::getURI(); ?>
 <div id="container-1"><!--begin tabs -->
            <ul>
                <li><a href="<?php echo $uri->toString() ;?>#fragment-1"><span>Further Exploration</span></a></li>
                <li><a href="<?php echo $uri->toString() ;?>#fragment-2"><span>View + Discuss</span></a></li>
                <li><a href="<?php echo $uri->toString() ;?>#fragment-3"><span>Teacher Information</span></a></li>

            </ul>


	<div id="fragment-1"><!-- we're indexed on 3 to start because or right orientation -->
		
	<?php if( $this->item->further_reading !=""): ?>
		<p><div id="ac_lesson_further_reading"></p>
		<?php echo $this->item->further_reading; ?>
		</div>
	<?php endif; ?>
	</div>
	
	<div id="fragment-2">
		
<!-- image section -->
<?php if( $this->item->image1 !=""): ?>
         <div id="ac_lesson_images_box"> <!-- we'll bang this php if out again after the last image to close the div -->
	   	<?php endif; ?>
		
    <table width="100%" border="0" cellpadding="0" cellspacing="0" id="ac_lesson_images">
		<tr>
   			<td align="center" valign="middle">
    		
            <?php if( $this->item->image1 !=""): ?>
            
            <?php $imagepath = JURI::base().'images/content/arts_curriculum/site/'. $this->item->image1 ;
			list($width, $height, $type, $attr) =getimagesize($imagepath);
			$ht=$height;
			$wd=$width; 
			if($height<119){
			$imgdim = 'width="120" height="92"';
			$padding = 'padding:51.5px 12.5px;';
			}else{
			$imgdim = 'height="125" width="91"';
			$padding = 'padding:35px 27px;';
			} ?>
			<div id="ac_image1_wrap">
			  <a class="thickbox" href="/images/content/arts_curriculum/masters/<?php echo $this->item->image1; ?>" id="ac_enlarge-collection" title="<?php echo $this->item->imgcap1;?>">Enlarge</a>
				
			  <div class="ac_collection-space" style="<?php echo $padding ;?>">
				<div id="ac_image1">
				<a class="thickbox" href="/images/content/arts_curriculum/masters/<?php echo $this->item->image1; ?>" title="<?php echo $this->item->imgcap1; ?>">
				<img src="/images/content/arts_curriculum/site/<?php echo $this->item->image1; ?>" <?php echo $imgdim; ?> /></a></div>
				</div>
				<div id="ac_dload"><a href="/images/content/arts_curriculum/dloads/<?php echo $this->item->image1; ?>" id="ac_dload"/>Download image</a></div>
			</div>
			<?php endif; ?>
            
            <?php if( $this->item->image2 !=""): ?>
            
            <?php $imagepath =JURI::base().'images/content/arts_curriculum/site/'. $this->item->image2 ;
			list($width, $height, $type, $attr) =getimagesize($imagepath);
			$ht=$height;
			$wd=$width; 
			if($height<195){
			$imgdim = 'width="120" height="92"';
			$padding = 'padding:51.5px 12.5px;';
			}else{
			$imgdim = 'height="125" width="91"';
			$padding = 'padding:35px 27px;';
			} ?>
              
            <div id="ac_image2_wrap">
			  <a class="thickbox" href="/images/content/arts_curriculum/masters/<?php echo $this->item->image2; ?>" id="ac_enlarge-collection" title="<?php echo $this->item->imgcap2;?>" >Enlarge</a>
				
			 <div class="ac_collection-space" style="<?php echo $padding ;?>">
				<div id="ac_image2">
				<a class="thickbox" href="/images/content/arts_curriculum/masters/<?php echo $this->item->image2; ?>" title="<?php echo $this->item->imgcap2; ?>">
				<img src="/images/content/arts_curriculum/site/<?php echo $this->item->image2; ?>" <?php echo $imgdim; ?> /></a></div>
				</div>
				<div id="ac_dload"><a href="/images/content/arts_curriculum/dloads/<?php echo $this->item->image2; ?>" id="ac_dload"/>Download image</a></div>
			
			</div>
			<?php endif; ?>
            
         	<?php if( $this->item->image3 !=""): ?>
         	
         	<?php $imagepath = JURI::base().'images/content/arts_curriculum/site/'. $this->item->image3 ;
			list($width, $height, $type, $attr) =getimagesize($imagepath);
			$ht=$height;
			$wd=$width; 
			if($height<195){
			$imgdim = 'width="120" height="92"';
			$padding = 'padding:51.5px 12.5px;';
			}else{
			$imgdim = 'height="125" width="91"';
			$padding = 'padding:35px 27px;';
			} ?>
         	
            <div id="ac_image3_wrap">
			  <a class="thickbox" href="/images/content/arts_curriculum/masters/<?php echo $this->item->image3; ?>" id="ac_enlarge-collection" title="<?php echo $this->item->imgcap3;?>" >Enlarge</a>
				
			  <div class="ac_collection-space">
				<div id="ac_image3">
				<a class="thickbox" href="/images/content/arts_curriculum/masters/<?php echo $this->item->image3; ?>" title="<?php echo $this->item->imgcap3; ?>">
				<img src="/images/content/arts_curriculum/site/<?php echo $this->item->image3; ?>" <?php echo $imgdim; ?> /></a></div>
				</div>
				<div id="ac_dload"><a href="/images/content/arts_curriculum/dloads/<?php echo $this->item->image3; ?>" id="ac_dload"/>Download image</a></div>
			
			</div>
			<?php endif; ?>          </td>
  		</tr>
  	
            <?php if( $this->item->image4 !=""): ?>
            <?php $imagepath = JURI::base().'/images/content/arts_curriculum/site/'. $this->item->image4 ;
			list($width, $height, $type, $attr) =getimagesize($imagepath);
			$ht=$height;
			$wd=$width; 
			if($height<195){
			$imgdim = 'width="120" height="92"';
			$padding = 'padding:51.5px 12.5px;';
			}else{
			$imgdim = 'height="125" width="91"';
			$padding = 'padding:35px 27px;';
			} ?>
    		<tr>
    			<td align="center">
            <div id="ac_image4_wrap">
			  <a class="thickbox" href="/images/content/arts_curriculum/masters/<?php echo $this->item->image4; ?>" id="ac_enlarge-collection" title="<?php echo $this->item->imgcap4;?>" >Enlarge</a>
				
			   <div class="ac_collection-space" style="<?php echo $padding ;?>">
				<div id="ac_image4">
				<a class="thickbox" href="/images/content/arts_curriculum/masters/<?php echo $this->item->image4; ?>" title="<?php echo $this->item->imgcap4; ?>">
				<img src="/images/content/arts_curriculum/site/<?php echo $this->item->image4; ?>" <?php echo $imgdim; ?> /></a></div>
				</div>
				<div id="ac_dload"><a href="/images/content/arts_curriculum/dloads/<?php echo $this->item->image4; ?>" id="ac_dload"/>Download image</a></div>
			
			</div>
            	</td>
  			</tr>
            
			<?php endif; ?>
         
	</table>
      	
			
		<?php if( $this->item->image1 !=""): ?>
  </div> <!-- close the div & end  php if statement -->
		<?php endif; ?>

			<?php if( $this->item->view_n_dis !=""): ?>
			<p><div id="ac_lesson_view_n_dis"></p>
			<?php echo $this->item->view_n_dis; ?>
			</div>
			<?php endif; ?>
			
			<div id ="ac_lessons_image_caps_box">
			
				<div id="imgcap1">
				<?php echo $this->item->imgcap1; ?><br/>
				</div>
				
				<div id="imgcap2">
				<?php echo $this->item->imgcap2; ?><br/>
				</div>
				<div id="imgcap3">
				<?php echo $this->item->imgcap3; ?><br/>
				</div>
				
				<div id="imgcap4">
				<?php echo $this->item->imgcap4; ?><br/>
				</div>
			
			</div>

</div><!--end fragment-2 -->
		
		<div id="fragment-3"> <!-- we're indexed on 3 to start because or right orientation -->
			<?php if( $this->item->main_body !=""): ?>
			<div id="ac_lesson_main_body">
			<p><?php echo $this->item->main_body; ?></p>
			</div>
			<?php endif; ?>
		
		
		</div><!--end fragment-3 -->

</div><!--end tabs -->
		
</div><!-- end ac_lesson_page-->